CCCCCCCCCCCC CCCCCCCCCCCC CCCC CCCC ooooooo CCCC oo oo nnn CCCC oo oo n n t r i b u t e d Library for the LC ChemStation CCCC oo oo n n CCCC ooooooo CCCC CCCCCCCCCCCC CCCCCCCCCCCC LC ChemStations Revision A.05.xx or higher Date 01/10/94 Macro Contribution #5 Contribution 'A set of advanced macro tools for selecting, arranging, manipulating and viewing the ChemStations chromatographic, spectroscopic and configurational information.' Revision History ---------------- 1. A.02.xx original version 2. A.03.xx includes installation update and minor revision compatibility changes 3. A.05.xx Update to the new revision. Includes the new spectral options. Data Interchange Tools export to Excel only functional with 16-bit version of MS-Excel 4. A.08.03 Added two parameters (start- and endtime of baseline) to call of MakePeakReg due to a change in MakePeakReg 5. pktools.mac is modified for A.09.01 (bug fixes) (01/08/01) 6. B.01.01 Update to the new revision. Data Interchange Tools export to Excel updated. 7. C.01.0x Update to the new revision. Macro DAitools. has been removed. 8. C.01.04 Macro pkstools.mac has been removed. It is now standard functionality in Data Analysis Contribution Purpose -------------------- The tools contained in this set of macros adds interactive ways to use the advanced features of the ChemStation. The following groups of features are available in this tool set... 1. Easy arrangement and selection of the ChemStation's windows. Writing graphics to window metafile format. 2. Moving objects between, deleting objects from and adding objects to different windows. 3. Manipulating chromatographic signals. 4. Spectral annotation and signal to noise calculations. 5. Peak purity advanced preferences setting, threshold and match calculations. 6. Spectral library optimization and management tools. 7. ChemStation register listing and contents examination. The spectral, purity and library functions are only available in the LC 3D ChemStation versions of the system. Contribution Structure ---------------------- The following macro files... 1. Tools.mac, selective loading main macro 2. SigTools.mac, signal tools 3. SpcTools.mac, spectral tools (LC 3D ChemStation only) 4. PurTools.mac, purity tools (LC 3D ChemStation only) 5. LibTools.mac, spectral library tools (LC 3D ChemStation only) 6. MacTools.mac, register tools 7. MaxChrom.mac, part of the SigTools.mac (LC 3D ChemStation only) Prerequisites ------------- - Windows Operating System as supported by the revision of the ChemStation in use - The LC ChemStation software, Rev A.05.xx or higher for the general and chromatographic functions - The LC 3D ChemStation software, Rev A.05.xx or higher for the general, chromatographic and spectral functions Installation ------------ * Copy all the macro files to the ChemStation's executable directory, 'C:\Chem32\CORE' by default. **************************************************************************** NOTE: Depending on your installation, the system needs the correct path statement for the Excel application. Within the macro daitools.mac at the very end of the macro, just before the "ENDMACRO" statement, the path needs to be defined. Macro section: !Please, update your path to excel.exe application. !Here is the example: MSExcelPath$ = "C:\Program Files\Microsoft Office\Office\" EndMacro **************************************************************************** Use --- * Load the main macro, Tools.mac, into the ChemStation using the Command... Macro Tools.mac The macro gives a warning message about the conditions of use and, if accepted, installs a new menu called 'Tools'. The menu contents depends on the ChemStation; the LC 3D ChemStation has all the functionality whereas the LC 2D ChemStation only will allow general and chromatographic signal operation. The groups of functions can be individually loaded as required by selecting the 'Load xxxxxx Tools' items from the tools menu. As part of the loading process the 'Load xxxxx Tools' menu item will be removed and replaced with a pop-up menu with the tools that have been demand loaded. **************************************************************************** NOTE: Some of the macros are using Excel to exchange data. If Excel is closed after a macro execution, the system ask to "if you want to save hpdain.xml macro". Please respond with NO, the hpdain.xml macro should not be changed. **************************************************************************** Operation Overview ------------------ Group 1, Graphics. The Graphics menu is expanded with the following items: 1.1 Edit Window Preferences WARNING This set of dialog boxes allows you to alter the standard graphical presentation of the ChemStation. Use with care and if you corrupt the operational integrity of your ChemStation, close it and delete the 'Conf*.reg' files in the appropriate instrument directory, for example - c:\chem32\1\conf_off.reg. The graphical preferences, axis style, cursor style and window style for the active window can be changed. Many windows in your chemsation have per default the same axis styles. As a change to the axis style would change all windows with the same axis style number, changing an axis style will create for the appropriate windows a private axis style entry. 1.2 Window To WindowMetaFile The active window is converted to the window metafile format and copied to a user specified file. 1.3 Command: WMF Window#,"File" (to be used at the command line) The Window# is converted to the window metafile format and copied to a user specified file. Group 1, Windows. The Windows items allow you to arrange the graphical windows through a cascade function and to change the active window by moving forwards or backwards through the list of windows. Group 2, The Edit Menu. The Edit Menu has the familiar Windows functions Copy, Cut, Paste and Paste/Append. The Copy and Cut operations become active when a object is selected in an 'EDTAB' window (see the commands online help). Objects are selected in these tables by clicking the mouse button between the Object column and the left edge of the window. The selected object or objects turn to inverse video. Consecutive multiple objects may be selected by using the Shift+Click keystroke as a second selection and non-consecutive objects with the Cntrl+Click keystroke for subsequent selections. The EDTAB Windows can be called from the menu system from the View->Window Functions->List Contents item and through the Macro Tools in this contribution. The Copy and Cut functions put a ChemStation specific register string in the windows clipboard. Note : Users wanting to copy data to the clipboard should look at group 9 below and users wanting to copy graphics to the clipboard should look at the macros\1\ library contribution). Once an object has been copied to the clipboard in this fashion it may be pasted by selecting the graphics or EDTAB window you want it to go into and selecting Paste, or the equivalent keystroke (see below). The object is then displayed in the Window that was selected. In this way objects may be moved between windows by Cutting and Pasting, deleted by just Cutting or just added to windows by just Pasting. Equivalent keystroke functions... Copy > Ctrl-C Cut > Ctrl-X Paste > Ctrl-V The Paste/Append function applies to Edtab table windows only. Selecting Paste/Append ensures the pasted object is appended to the table. Group 3, The Signals Menu. The signals menu provides the following items... 3.1 - Maximum chromatogram For the LC 3D ChemStation only, this function extracts the maximum chromatogram from a spectral matrix. This is the same as the library \macros\6 contribution. 3.2 - Noise Will determine the noise, drift and wander in a time range, which can be selected by the user. More details about noise types and operation, you will find in the appendix at the end of this file. 3.3 - Original signals Will reset the display to the state it was before any of the mathematical functions, listed below, was executed. 3.4 - Derivative... Calculates the derivative of the signal and displays it. Users can select 1st to 3rd order derivatives, the filter length and polynomial degree. 3.5 - Smoothing... Smooths a signal and displays it. The user can define the filter length and polynomial degree. 3.6 - Splining... Splines a signal and displays it. The user can define the number of intervals between each data point, see the SplineObj entry in the Commands manual. 3.7 - Inverting Inverts (multiply the Y axis by -1) a signal. 3.8 - Ratio Ratios two signals together with a user selectable threshold value. The result replaces the first object displayed. 3.9 - Subtract baseline Subtracts the baseline, as determined by the integration results, from the signal. Group 4, The Spectral Menu (LC 3D ChemStation only). The spectral menu provides the following items... 4.1 Signal/Noise as a function of bandwidth Based on the last spectrum extracted from the chromatogram, this function allows the user to graphically select a wavelength from the spectra and calculates, as a function of increasing the signal bandwidth, the ... * resulting peak area * signal at the selected wavelength * the signal to noise ratio The results are shown graphically in a separate window. The spectral window is annotated with the selected wavelength and bandwidth as the calculations proceed. The user may select a new wavelength from the spectrum window to recalculate at a different wavelength. Pressing the escape key resets the selection on the spectrum window to normal. 4.2 Optimal Signal/Noise This function scans the last spectrum selected into the spectral window for the optimum signal to noise ratio. The results are displayed graphically in a separate window. The display shows four plots... * The signal wavelength and bandwidth for the optimum signal to noise ratio shown overlaid on the spectrum. * The Signal/Noise ratio as a function of wavelength. * The signal wavelength as a function of the maximum bandwidth with the optimum signal to noise wavelength and bandwidth shown overlaid. * A plot showing the signal range for the optimum signal to noise detection wavelength and bandwidth. 4.3 Spectrum maximum and minimum annotation Annotates the maxima and minima on the last spectrum selected into the spectral window. Uses a 'normal' threshold sensitivity. 4.4 Spectrum maximum annotation Annotates the maxima on the last spectrum selected into the spectral window. Uses a 'normal' threshold sensitivity. 4.5 Spectrum more sensitive annotation Annotates according to the mode set (see 5.3 & 5.4) but annotates without a threshold and therefore shows all the maxima and minima. The setting is a condition marked in the menu with a check mark. It can be turned on and off by reselecting the menu item. 4.6 Spectrum time annotation Annotates the chromatogram with the retention times of the spectra shown in the spectral window. The setting is a condition marked in the menu with a check mark. It can be turned on and off by reselecting the menu item. 4.7 Print Options Prints the current spectrum options to the printer. Group 5, The Purity Menu (LC 3D ChemStation only). The purity menu provides the following items... 5.1 options Calls the standard peak purity options dialog box. 5.2 Advanced options Calls the standard advanced peak purity options dialog box. 5.3 More advanced options Calls a very advanced non-standard peak purity options dialog box. 5.4 Print options Prints the peak purity preference settings. 5.5 Calculate threshold Allows the user to define a start time and the number of spectra to be evaluated to determine the spectral noise threshold. A part of the chromatogram with a 'quiet baseline' should be chosen. The threshold is reported and the user given the option to set the value as the default standard deviation of noise used in the calculation of the threshold curves during peak purity evaluation. If the user activates this default setting the threshold value will be taken and not calculated every time the peak purity function is called. This will make the initialization of the standard peak purity evaluation faster. 5.6 Show match Calculates a match factor on the last two spectra selected from the chromatogram. The results are displayed in three graphical windows ... * A display of the deviation of the spectra from the ideal match factor as a function of wavelength. * A graphical display of the match factor plotted as the response (mAU) of the first spectrum against the second. The least squares regression line is calculated and the plot also reports the slope and intercept of the line and the match factor. * A display of the deviation from the ideal match plotted as a function of the absorbance of the first spectrum. 5.7 Redo peak purity Calls the standard peak purity routine as in 6.8 but the software uses the peak number previously assigned. 5.8 Redisplay peak purity evaluation Displays the last peak purity evaluation without recalculating. 5.9 Display All peak purity data Displays, if available, the eight graphical and table windows used in the peak purity evaluation... * The spectral differences * The selected spectra * The peak purity signals * The peak purity results table * The match plot (similarity curve) across the peak * The threshold plot (threshold curve) across the peak * The purity spectrum comparison register * The purity reference register Group 6, The Spectral Library Menu (LC 3D ChemStation only). The spectral library menu provides the following items... 6.1 Tool box The tool box shows a list of all the entries in a loaded library and allows the user to... * Append a library on disc to the loaded one * To view a selected spectrum after optional mathematical processing including derivatization, smoothing, splining and log processing. * To view and do the maths processing, described above, on ALL the library spectra. * To calculate and display, as a table and graphic, the best matches of the spectra in the library to each other. 6.2 Auto shift Auto shift maximizes the match factor for a spectra and library match by shifting the spectra wavelength. Wavelength shifts can be programmed in the library entries. The match factor, as a function of wavelength shift in the range +/- 5%, is displayed graphically. 6.3 All Peak Apex Spectra Extracts all the integrated peak apex spectra to the spectral window. 6.4 Spectra to new file Makes a new library out of the spectra displayed in the spectral window. 6.5 Print Spectrum Preferences Prints the spectral preference settings. Group 7, The Register Menu. WARNING This group of functions allows you to alter the presentation and standard operation of the ChemStation. Use with care. If you corrupt the operational integrity of your ChemStation, close it and delete the 'Conf*.reg' files in the appropriate instrument directory, for example - c:\chem32\1\conf_off.reg. A review of the Customizing Your ChemStation manual, sections 9 and 10, would be useful before using these tools, to clarify the nomenclature and principals referred to by the tools and the descriptions below. The register menu provides the following items... 7.1 List registers Displays a list of ChemStation registers in a table. Standard functions such as delete, save, print and load are available. The most useful, however, are ... * List Headers, that lists headers that typically describe the object. The headers are numbers, strings and tables. The tables are indicated with the contents ''. Table data can be accessed by double clicking on the field annotated with '
'. * List Object, that lists the object header descriptive items and allows you to list the object data through the 'List Data' button. The data, if there is any, is displayed in another table window. From here data rows can be selected and copied to the clipboard by the Ctrl-C keystrokes. (Also see the data interchange tools below). Appendix, Noise Determination Operating procedure: First load a signal for which the noise should be determined. Then select the menu item >>Noise<< from the signal tools. You will be asked to define a time range by positioning the graphic cursor to the left side of the time range and pressing the left mouse button. Keeping the left mouse button pressed down you move to the right side of the time range and release the mouse button. A dialog box will appear describing the chosen time range and if ASTM noise calculation is possible, you can define the rate of overlapping of the cycles from 10 to 90% in 10% steps. If the chosen time range is below 10 minutes only very-short-term ASTM noise determination is possible. If the chosen time range is between 10 and 60 minutes, the short-term ASTM noise is also determined. If the chosen time range is greater than 60 minutes you have in addition the choice of long-term ASTM noise calculation. Now the following action can be taken: Add to Method: The time range is added to the method allowing an automatic noise determination when the method is processed. Up to 7 time ranges can be added to the method. To remove these entries select the Edit Noise Ranges... menu item of the System Suitability submenu in the report menu. Cancel Cancels the noise determination. Determine Noise The noise is determined. If an ASTM noise determination is possible, then the percentage of overlapping of the cycles can be entered. You can choose between 0, 10, 20, 30, 40 or 50% overlapping. The results are displayed in an additional window showing the signal noise with linear regression and confidence interval. If ASTM noise determination was possible each cycle is also displayed with linear regression and peak to peak interval. The cycle with the highest peak to peak noise is marked. Also the cycle with having the highest positive and highest negative slope (drift) is marked. The noise values and the drift values are shown in an additional dialog box. The drift is given in response units per hour for a time range greater equal than one minute and response units per minute for a time range less than one minute. All results (plot and table) can be printed. Details about the theory of the noise calculation can be found in the manual 'Reference to Your ChemStation Edition' Chapter 6: 'Evaluating System Suitability'.